<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户登录</title>
</head>
<body>
<h2>用户登录</h2>
<div th:if="${error}" style="color: red;" th:text="${error}"></div>
<form action="/login" method="post">
    用户名：<input type="text" name="username" required><br>
    密码：<input type="password" name="password" required><br>
    <input type="submit" value="登录">
</form>
<p>还没有账号？<a href="/register">立即注册</a></p>
</body>
</html> 